<!--
+----------------------------------------------------------------------
| 友得云客  - 开启房产营销新纪元
+----------------------------------------------------------------------
| Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
+----------------------------------------------------------------------
| Licensed 友得云客不是自由软件 未经允许不可移除相关版权
+----------------------------------------------------------------------
| Author: www.youdeyunke.com
+----------------------------------------------------------------------
-->
<template>
    <div v-cloak v-if="module && module.radius.editable">
        <el-form-item label="圆角">
            <el-switch v-model="module.radius.editAllRadius" active-text="编辑单个" inactive-text="编辑整体"  />
            <el-form-item label="整体" v-if="!module.radius.editAllRadius" style="margin-top: 15px;">
                <el-input-number controls-position="right" maxlength="2" type="Number" style="width: 90px;" :min="0" :max="30" v-model="module.radius.value" />
            </el-form-item>
            <template v-else>
                <el-form-item label="左上" style="margin-top: 15px;">
                    <el-input-number controls-position="right" maxlength="2" type="Number" style="width: 90px;" :min="0" :max="30" v-model="module.radius.lefttop" />
                </el-form-item>
                <el-form-item label="右上">
                    <el-input-number controls-position="right" maxlength="2" type="Number" style="width: 90px;" :min="0" :max="30" v-model="module.radius.righttop" />
                </el-form-item>
                <el-form-item label="左下">
                    <el-input-number controls-position="right" maxlength="2" type="Number" style="width: 90px;" :min="0" :max="30" v-model="module.radius.leftbottom" />
                </el-form-item>
                <el-form-item label="右下">
                    <el-input-number controls-position="right" maxlength="2" type="Number" style="width: 90px;" :min="0" :max="30" v-model="module.radius.rightbottom" />
                </el-form-item>
            </template>
        </el-form-item>

    </div>
</template>

<script>
import SliderInput from "@/components/SliderInput";
export default {
    components: { SliderInput },
    data () {
        return {
            loading: false,
        };
    },
    props: {
        module: { type: Object, default: null },
    },

    mounted: function () {
        if (typeof this.module.radius == "undefined") {
            var r = { value: 6, min: 0, max: 10 };
            this.$set(this.module, "radius", r);
        }
    },

    computed: {},

    methods: {},
};
</script>

<style scoped></style>
